type Constructor = new (...args: any[]) => any;
type ConstructorParameters<T extends Constructor> = T extends new (...args: infer P) => any ? P : never;
// @ts-ignore
type InstanceType<T extends Constructor> = T extends new (...args: any[]) => infer R ? R : any;

// @ts-ignore
class Person {
    name: string;
    constructor(name: string) {
        this.name = name;
    }
    getName() { console.log(this.name) }
}
//构造函数参数
type constructorParameters = ConstructorParameters<typeof Person>;
//实例类型
type Instance = InstanceType<typeof Person1>;
// @ts-ignore
let instance: Instance = { name: 'zhufeng', getName() { } };